import 'package:factoryside/bean/factory_brand_entity.dart';

factoryBrandEntityFromJson(FactoryBrandEntity data, Map<String, dynamic> json) {
	if (json['Id'] != null) {
		data.id = json['Id'] is String
				? int.tryParse(json['Id'])
				: json['Id'].toInt();
	}
	if (json['FBrandID'] != null) {
		data.fBrandID = json['FBrandID'] is String
				? int.tryParse(json['FBrandID'])
				: json['FBrandID'].toInt();
	}
	if (json['UserID'] != null) {
		data.userID = json['UserID'].toString();
	}
	if (json['FBrandName'] != null) {
		data.fBrandName = json['FBrandName'].toString();
	}
	if (json['IsUse'] != null) {
		data.isUse = json['IsUse'].toString();
	}
	if (json['Categorys'] != null) {
		data.categorys = json['Categorys'];
	}
	if (json['page'] != null) {
		data.page = json['page'] is String
				? int.tryParse(json['page'])
				: json['page'].toInt();
	}
	if (json['limit'] != null) {
		data.limit = json['limit'] is String
				? int.tryParse(json['limit'])
				: json['limit'].toInt();
	}
	if (json['Version'] != null) {
		data.version = json['Version'] is String
				? int.tryParse(json['Version'])
				: json['Version'].toInt();
	}
	return data;
}

Map<String, dynamic> factoryBrandEntityToJson(FactoryBrandEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['Id'] = entity.id;
	data['FBrandID'] = entity.fBrandID;
	data['UserID'] = entity.userID;
	data['FBrandName'] = entity.fBrandName;
	data['IsUse'] = entity.isUse;
	data['Categorys'] = entity.categorys;
	data['page'] = entity.page;
	data['limit'] = entity.limit;
	data['Version'] = entity.version;
	return data;
}